#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int s, v, time, a, b;
    double t;
    cin >> s >> v;
    t = ceil(1.0 * s / v) + 10;
    time_late = (24 + 8) * 60 - t;
    if (time_late >= 24 * 60)
    {
        time = time_late - 24 * 60;
        b = time % 60;
        a = time / 60;
        if (b < 10)
            cout << "0" << a << ":" << "0" << b << endl;
        else
            cout << "0" << a << ":" << b << endl;
    }
    else
    {
        a = time_late / 60;
        b = time_late % 60;
        if (a < 10)
        {
            if (b < 10)
                cout << "0" << a << ":" << "0" << b << endl;
            else
                cout << "0" << a << ":" << b << endl;
        }
        else
        {
            if (b < 10)
                cout << "0" << a << ":" << "0" << b << endl;
            else
                cout << "0" << a << ":" << b << endl;
        }
    }
    return 0;
}